package com.at.service.impl;

import com.at.dao.UserDao;
import com.at.domain.User;
import com.at.service.UserService;
import com.at.util.MD5Util;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author : code1997
 * @date :2020-09-2020/9/27 19:43
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDao userDao;

    @Override
    public User checkUser(String username, String password) {
        return userDao.findByUsernameAndPassword(username, MD5Util.md5(password));
    }
}
